<#include "/WEB-INF/fragment/teamHead.ftl">
<body>
     <div class="container">
     <div class="head clearfix">
            <div class="title fl"><a href="${request.contextPath}/index">教学过程控制系统</a></div>
            <div class="login-fr fr"><#if Session?exists&&Session.userLogin?exists>
        <li class="dropdown">
                 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">欢迎你， ${Session.userLogin.username!""} <span class="caret"></span></a>
                 <ul class="dropdown-menu">
                   <li><a href="${request.contextPath}/-myTeam">我的团队</a></li>
                   <li role="separator" class="divider"></li>
                   <li><a href="${request.contextPath}/logout">退出登录</a></li>
                 </ul>
               </li>
        </#if></div>
      </div>
      <div>
      <div class="pic" align="center"><img src="http://172.16.1.55/logo.png"></div>
        <div class="team clearfix">
        <form action="${request.contextPath}/-team" class="am-form" id="ue-form" method="post">
      <div class="create-team fl"><#if team?exists&&team.id?exists>${team.id}</#if>创建或修改团队</div>
       <div class="fr"><button type="submit" class="btn">保存</button></div>
       <div class="invate fr"><a href="">邀请成员</a></div>
       <div class="myteam fr"><a href="${request.contextPath}/-myTeam">我的团队</a></div>
        </div>
        <div class="underline"></div>
        <div class="input" align="center">
        <div> <#if ActionErrors??>
<#list ActionErrors as error>
        ${error}
</#list>
        </#if></div>
               <div><label>团队名称</label><input type="text" name="team.name" value="<#if team?exists && team.name?exists>${team.name}</#if>"> ${FieldErrors['team.name']!""}
                <div>团队名称：如java1605</div>
                <div><label>团队描述</label><input type="text" name="team.desc" value="<#if team?exists && team.desc?exists>${team.desc}</#if>"> ${FieldErrors['team.desc']!""}
                <div>团队的描述，如java专业第1605实训部</div>
                </div>
                <div><label>个性域名</label>/team-<input type="text" name="team.subdomain" value="<#if team?exists && team.subdomain?exists>${team.subdomain}</#if>">${FieldErrors['team.subdomain']!""}
                <div>可以使用个性域名访问该团队地址，默认为-team{team-id},创建之后不能修改</div>
                </div>
    <div class="am-form-group">
      <label for="doc-vld-ta-2">团队介绍</label>${FieldErrors['introduction']!""}
      <textarea name="team.intro" style="width: 500px;height: 200px;" value="<#if team?exists && team.intro?exists>${team.intro}</#if>"></textarea>
    </div>
                <div><label>开始日期</label><input type="text" name="team.startTime" value="<#if team?exists && team.startTime?exists>${team.startTime}</#if>"></div>
                <div><label>预计结束日期</label><input type="text" name="team.endTime" value="<#if team?exists && team.endTime?exists>${team.endTime}</#if>"></div>
                <div><label>团队状态</label>
                <div><label><input type="radio" name="team.status" value="1" <#if team??&&team.status??&&team.status == 1> checked</#if>>尚未开始</label></div>
                <div><label><input type="radio" name="team.status" value="2" <#if team??&&team.status??&&team.status == 2> checked</#if>>正在实训中</label></div>
                <div><label><input type="radio" name="team.status" value="3" <#if team??&&team.status??&&team.status == 3> checked</#if> >毕业项目实战</label></div>
                <div><label><input type="radio" name="team.status" value="4" <#if team??&&team.status??&&team.status == 4> checked</#if>>完成实训</label></div>
                <div><label><input type="radio" name="team.status" value="5" <#if team??&&team.status??&&team.status == 5> checked</#if> >结束团队</label></div>
                </div>
        </div>
         </div>
            </form>
            </div>
            </div>
            </div>
<!--  //    $(document).on('submit', '.am-form', function(event) {
 //      var param = $('.am-form').serialize();
 // param = param + '&struts.enableJSONValidation=true';
 // $.post('${request.contextPath}/-team.action', param, function(data, textStatus, xhr) {
 //   if(data['fieldErrors'] != null) {
 //     for (var i in data['fieldErrors']) {
 //       $('input[name="'+i+'"]').next().html(data['fieldErrors'][i]);
 //     }
 //     return;
 //   }

    //if (data['status'] === 1) {
    //  alert(data['message']);
    //  window.location.href = '${request.contextPath}/myTeam.action';
    //}
 //   if (data['status'] === 2) {
 //     alert(data['message']);
 //   }
 // });
 // return false;
 //}); -->

</body>
</html>